//
// Created by XML on 2023/9/13.
//
#include "stdio.h"
#include "limits.h"
int main(){


    short short_int = 10;  // 短整型
    int i = 100; // 整型
    long long_int = 10; // 长整型
    long long longlong_int = 10; // 长长整型

    unsigned int unsigned_int = 112;
    unsigned long unsigned_long = 111;

    // d = decimal 十进制
    // x = hex  十六进制
    // o = oct   八进制
    // hd%: short decimal
    // %d: decimal
    // %ld: long decimal
    // %lld: long long decimal
    // %hu: unsigned short decimal


    //  100的十进制、十六进制、八进制
    printf("i decimal: %d\n",i);
    printf("i hex: %x\n",i);
    printf("i oct: %o\n",i);

    // sizeof操作符，可以知道操作类型的字节存储大小
    printf("short int: %d\n",sizeof(short int));
    printf("int: %d\n",sizeof(int));
    printf("long: %d\n",sizeof(long int) );
    printf("long long: %d\n",sizeof(long long int));

    // 整数的范围
    printf("max int %d, min %d\n", INT_MAX, INT_MIN);
    printf("max int %ld, min %ld\n", LONG_MAX, LONG_MIN);
    printf("unsigned max int %u, unsigned min %d\n", UINT_MAX, 0);
    return 0;
}